1. Introducción

Los datos que se analizan en este informe corresponden a los datos de los acuerdos de paz disponibles en http://www.peaceagrements.org en especial los que se proporcionan en el fichero https://www.peaceagreements.org/files/pax_all_agreements_data.csv de la web.

El archivo consta de 1789 registros con 266 variables detalladas en https://www.peaceagreements.org/files/PA_X_codebook_Version2_June_2019.pdf

2. Análisis descriptivo.

2.1. Carga de los datos.

Cargo el archivo de datos ‘pax_all_agreements_data.csv’. Una vez cargado el archivo, compruebo el tipo de datos de los mismos.

Primero, inspecciono el tipo de formato .csv que tiene el archivo.

# Método alternativo para inspeccionar el archivo.
#fileName <- "rawData.csv"
#conn <- file(fileName, open = "r")
#lines <- readLines(conn)
#head(lines)
#close(conn)
#Inspecciono el archivo
filecheck <- readLines("pax_all_agreements_data.csv") 
# Muestro la cabecera
#print(filecheck[0:4])
#head(filecheck,4)
# Muestro la cabecera formateada con kable
kable(head(filecheck), caption = 'Primeras lineas del archivo $pax_all_agreements_data.csv$') %>%
  kable_styling("condensed", full_width = F, position = "left") %>%
  #Para quitar una x que toma por defecto como nombre de columna
  row_spec(0, color = "white") 
Primeras lineas del archivo \(pax_all_agreements_data.csv\)
x
Con,Contp,PP,PPName,Reg,AgtId,Agt,Dat,Status,Lgt,N_characters,Agtp,Stage,StageSub,Part,ThrdPart,OthAgr,Loc1ISO,Loc2ISO,Loc1GWNO,Loc2GWNO,UcdpCon,UcdpAgr,PamAgr,CowWar,GCh,GChRhet,GChAntid,GChSubs,GChOth,GDis,GDisRhet,GDisAntid,GDisSubs,GDisOth,GAge,GAgeRhet,GAgeAntid,GAgeSubs,GAgeOth,GMig,GMigRhet,GMigAntid,GMigSubs,GMigOth,GRa,GRaRhet,GRaAntid,GRaSubs,GRaOth,GRe,GReRhet,GReAntid,GReSubs,GReOth,GInd,GIndRhet,GIndAntid,GIndSubs,GIndOth,GOth,GOthRhet,GOthAntid,GOthSubs,GOthOth,GRef,GRefRhet,GRefSubs,GRefOth,GSoc,GSocRhet,GSocAntid,GSocSubs,GSocOth,GeWom,GeMe,GeMeNu,GeMeOth,GeSo,GeLgbti,GeLgbtiPos,GeLgbtiNeg,GeFa,StDef,StGen,StCon,StSd,StRef,StSym,StInd,StUni,StBor,StXbor,Pol,PolGen,PolNewInd,PolNewTemp,ConRen,Cons,Ele,ElecComm,PolPar,PolParTrans,PolParOth,Civso,Tral,Pubad,Polps,PpsSt,PpsSub,PpsEx,PpsOro,PpsOthPr,PpsVet,PpsAut,PpsInt,PpsOth,Terps,TpsSub,TpsLoc,TpsAut,TpsOth,Eps,EpsRes,EpsFis,EpsOth,Mps,MpsMe,MpsJt,MpsPro,MpsOth,HrGen,EqGen,HrDem,Prot,ProtCiv,ProtGrp,ProtLgl,ProtOth,HrFra,HrfSp,HrfBor,HrfTinc,HrfOth,HrCp,CprLife,CprTort,CprEq,CprSlav,CprLib,CprDet,CprFmov,CprFspe,CprFass,CprTria,CprPriv,CprVote,CprReli,CprOth,HrSec,SerProp,SerWork,SerHeal,SerEdu,SerStdl,SerShel,SerSs,SerCult,SerOth,HrNi,HrNiMe,HrNiNe,HrNiOth,HrIi,HrIiMon,HrIiBod,HrIiOth,HrMob,HrDet,Med,MedGov,MedSubs,MedLog,MedOth,HrCit,CitGen,CitRights,CitDef,CitOth,JusCr,JusCrSp,JusCrSys,JusCrPow,JusEm,JusJu,JusPri,JusTra,Dev,DevSoc,DevHum,DevInfra,NEC,NatRes,IntFu,Bus,Tax,TaxPo,TaxRef,TaxOth,Ban,CenBan,BanPers,BanInt,BanXb,LaRef,LaRefMan,LaRefRet,LaRefOth,LaNom,LaCH,LaCHTa,LaCHIt,LaCHPro,LaCHOth,LaEn,Wat,SsrGua,Ce,CeProv,CeGen,SsrPol,SsrArm,SsrDdr,DdrDemil,DdrProg,SsrInt,SsrPsf,SsrFf,Cor,SsrCrOcr,SsrDrugs,Terr,TjGen,TjAm,TjAmPro,TjSan,TjPower,TjAmBan,TjCou,TjJaNc,TjJaIc,TjMech,TjPrire,TjVet,TjVic,TjMis,TjRep,TjRSym,TjRMa,TjNR,ImUN,ImOth,ImRef,ImPK,ImE,ImSrc
Afghanistan,Government,2,“Afghanistan: 2000s Post-intervention process”,“Europe and Eurasia”,1739,“Agreement between the Islamic Republic of Afghanistan and Hizb-e-Islami”,2016-09-22,“Multiparty signed/agreed”,4,10203,Intra,SubPar,MultIss,“President of the IRA Mohammad Ashraf Ghani, chairman of HIA delegation Gulbuddin Hekmatyar, chairman of HPC Peer Sayed Ahmad Gailani and HIA head of peace delegation, Mohammad Ameen Karim.”,,,AFG,,700,,333,1488,,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,2,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,2,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,1,1
Afghanistan,Government,2,“Afghanistan: 2000s Post-intervention process”,“Europe and Eurasia”,1923,“Agreement between the two campaign teams regarding the structure of the national unity government”,2014-09-21,“Multiparty signed/agreed”,4,11110,Intra,Imp,ExtSub,“Dr. Mohammad Ashraf Ghani Ahmadzai
Dr. Abdullah Abdullah“,”The foregoing signatures were witnessed by:
H.E. Jan Kubis, Special Representative of the Secretary General of the United Nations
H.E. James B. Cunningham, Ambassador of the United States of America“,”Page 3, D. Creation of the position of leader of the runner-up team

Se observa como el fichero está separado por comas “,” y el delimitador de decimales es el punto.

Procedo a leer el archivo en un dataframe y muestro las primeras líneas.

# Leo el archivo en el dataframe peace
peace <- read.csv("pax_all_agreements_data.csv", sep=",",na.strings = "NA")  
# Muestro las primeras líneas formateadas con kable
kable(head(peace)) %>% 
  #kable_styling(bootstrap_options = c("striped", "hover", 
  #                                    "bordered", condensed", "responsive")) 
  kable_styling("condensed", full_width = F, position = "left") 
ï..Con Contp PP PPName Reg AgtId Agt Dat Status Lgt N_characters Agtp Stage StageSub Part ThrdPart OthAgr Loc1ISO Loc2ISO Loc1GWNO Loc2GWNO UcdpCon UcdpAgr PamAgr CowWar GCh GChRhet GChAntid GChSubs GChOth GDis GDisRhet GDisAntid GDisSubs GDisOth GAge GAgeRhet GAgeAntid GAgeSubs GAgeOth GMig GMigRhet GMigAntid GMigSubs GMigOth GRa GRaRhet GRaAntid GRaSubs GRaOth GRe GReRhet GReAntid GReSubs GReOth GInd GIndRhet GIndAntid GIndSubs GIndOth GOth GOthRhet GOthAntid GOthSubs GOthOth GRef GRefRhet GRefSubs GRefOth GSoc GSocRhet GSocAntid GSocSubs GSocOth GeWom GeMe GeMeNu GeMeOth GeSo GeLgbti GeLgbtiPos GeLgbtiNeg GeFa StDef StGen StCon StSd StRef StSym StInd StUni StBor StXbor Pol PolGen PolNewInd PolNewTemp ConRen Cons Ele ElecComm PolPar PolParTrans PolParOth Civso Tral Pubad Polps PpsSt PpsSub PpsEx PpsOro PpsOthPr PpsVet PpsAut PpsInt PpsOth Terps TpsSub TpsLoc TpsAut TpsOth Eps EpsRes EpsFis EpsOth Mps MpsMe MpsJt MpsPro MpsOth HrGen EqGen HrDem Prot ProtCiv ProtGrp ProtLgl ProtOth HrFra HrfSp HrfBor HrfTinc HrfOth HrCp CprLife CprTort CprEq CprSlav CprLib CprDet CprFmov CprFspe CprFass CprTria CprPriv CprVote CprReli CprOth HrSec SerProp SerWork SerHeal SerEdu SerStdl SerShel SerSs SerCult SerOth HrNi HrNiMe HrNiNe HrNiOth HrIi HrIiMon HrIiBod HrIiOth HrMob HrDet Med MedGov MedSubs MedLog MedOth HrCit CitGen CitRights CitDef CitOth JusCr JusCrSp JusCrSys JusCrPow JusEm JusJu JusPri JusTra Dev DevSoc DevHum DevInfra NEC NatRes IntFu Bus Tax TaxPo TaxRef TaxOth Ban CenBan BanPers BanInt BanXb LaRef LaRefMan LaRefRet LaRefOth LaNom LaCH LaCHTa LaCHIt LaCHPro LaCHOth LaEn Wat SsrGua Ce CeProv CeGen SsrPol SsrArm SsrDdr DdrDemil DdrProg SsrInt SsrPsf SsrFf Cor SsrCrOcr SsrDrugs Terr TjGen TjAm TjAmPro TjSan TjPower TjAmBan TjCou TjJaNc TjJaIc TjMech TjPrire TjVet TjVic TjMis TjRep TjRSym TjRMa TjNR ImUN ImOth ImRef ImPK ImE ImSrc
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 1739 Agreement between the Islamic Republic of Afghanistan and Hizb-e-Islami 2016-09-22 Multiparty signed/agreed 4 10203 Intra SubPar MultIss President of the IRA Mohammad Ashraf Ghani, chairman of HIA delegation Gulbuddin Hekmatyar, chairman of HPC Peer Sayed Ahmad Gailani and HIA head of peace delegation, Mohammad Ameen Karim. AFG 700 NA 333 1488 NA 851 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 2 0 1 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 1 1
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 1923 Agreement between the two campaign teams regarding the structure of the national unity government 2014-09-21 Multiparty signed/agreed 4 11110 Intra Imp ExtSub Dr. Mohammad Ashraf Ghani Ahmadzai Dr. Abdullah Abdullah The foregoing signatures were witnessed by: H.E. Jan Kubis, Special Representative of the Secretary General of the United Nations H.E. James B. Cunningham, Ambassador of the United States of America

Page 3, D. Creation of the position of leader of the runner-up team In line with the Joint Declaration of 17 Asad 1393 (August 8, 2014) and its annex, and with the goal of strengthening and expanding democracy, the position of the leader of the runner-up team, referred to in the mentioned document as the opposition leader, will be created and officially recognized within the framework of the government of the Islamic Republic of Afghanistan on the basis of a presidential decree.

Page 4, G. Entry-into-force Honoring their commitments to the Technical and Political Frameworks of July 12, 2014, and the Joint Declaration of August 8, 2014, as reflected throughout this agreement, the parties reaffirm their commitment regarding the outcome of the election and implementation of this agreement to establish the national unity government, which will enter into force upon signing by the two candidates in the presence of Afghan and international witnesses.
AFG 700 NA 333 NA NA 225 2 1 0 1 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 2 3 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 864 Tokyo Declaration Partnership for Self-Reliance in Afghanistan from Transition to Transformation (Tokyo Conference) 2012-07-08 Multiparty signed/agreed 14 39746 InterIntra Imp ExtSub Not signed, agreement mentions the following parties as having produced it: The Afghan Government and the International Community (representatives from 55 countries and 25 international and other organizations from around the world) Ambassador Kazuo Kodama, Chargé d’affaires ad interim Permanent Mission of Japan to the United Nations

Page 2, Preamble, 1 … These undertakings are built on the outcome of the Bonn Conference in December 2011, where the Afghan Government and the International Community mutually renewed their long-term commitments in the areas of governance, security, peace process, economic and social development, and regional cooperation, as well as on the outcomes of the previous international conferences such as the London Conference in January 2010 and the Kabul Conference in July 2010.

Page 3, Preamble, 4 … Today in Tokyo, the Afghan Government and the International Community succeeded in transforming their mutual commitments made in Bonn to cooperate throughout the Transformation Decade into a solid and credible framework focused on the priorities of the Afghan Government as contained in its strategy paper Towards Self-Reliance.

Page 4, Security and Peace Process, 9 … The Participants reaffirmed the importance of the peace and reconciliation process with a view to ending the ongoing violence in the country and restoring lasting peace and security as per the UN Security Council Resolutions and as stated in the London and Kabul Communiqués, and reconfirmed in the Bonn Conclusions.

Page 5, Governance and Strategy for Economic Self-Reliance, 14 … The International Community welcomed the Afghan strategy, and reaffirmed its commitment of aligning 80 percent of aid with the NPPs and channeling at least 50 percent of its development assistance through the national budget of the Afghan Government in accordance with the London and Kabul Communiqués.

Page 7, Regional Cooperation, 19 … The Participants welcomed the conclusion of the Afghanistan-Pakistan Transit Trade Agreement (APTTA), the transit agreement between Afghanistan and Tajikistan, and the Agreement on Cross-Border Transport of Persons, Vehicles, and Goods (CBTA) among Afghanistan, the Kyrgyz Republic and Tajikistan within the framework of CAREC.

Page 9, Tokyo Mutual Accountability Framework, 2 … this accountability framework concretizes the mutual commitments decided in the Kabul Process and reaffirmed at the Bonn Conference by stipulating shared development and governance goals and a mechanism as described in this document to hold parties accountable for achieving them.
AFG 700 NA 333 NA NA 225 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 2 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 1 1 0 1 0 3 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 2 2 2 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 848 Conclusions of the Conference on Afghanistan and the International Community: From Transition to the Transformation Decade (Bonn Conference) 2011-12-05 Multiparty signed/agreed 7 24106 InterIntra Pre Prin Not signed, agreement mentions the following parties as having produced it: Islamic Republic of Afghanistan, the Republic of Albania, the People’s Democratic Republic of Algeria, the Argentine Republic, the Republic of Armenia, Australia, the Republic of Austria, the Republic of Azerbaijan, the Kingdom of Bahrain, the People’s Republic of Bangladesh, the Kingdom of Belgium, Bosnia and Herzegovina, Federative Republic of Brazil, Brunei Darussalam, the Republic of Bulgaria, Canada, the People’s Republic of China, the Republic of Colombia, the Republic of Croatia, the Republic of Cyprus, the Czech Republic, the Kingdom of Denmark, the Arab Republic of Egypt, the Republic of El Salvador, the Republic of Estonia, the Republic of Finland, the French Republic, Georgia, the Federal Republic of Germany, the Hellenic Republic, the Republic of Hungary, the Republic of Iceland, the Republic of India, the Republic of Indonesia, the Islamic Republic of Iran, the Republic of Iraq, Ireland, the Republic of Italy, Japan, the Hashemite Kingdom of Jordan, the Republic of Kazakhstan, the Republic of Korea, the State of Kuwait, the Kyrgyz Republic, the Republic of Latvia, the Lebanese Republic, the Principality of Liechtenstein, the Republic of Lithuania, the Grand Duchy of Luxembourg, the former Yugoslav Republic of Macedonia, Malaysia, the Republic of Malta, the United Mexican States, Mongolia, Montenegro, the Kingdom of Morocco, the Kingdom of the Netherlands, New Zealand, the Kingdom of Norway, the Sultanate of Oman, the Republic of the Philippines, the Republic of Poland, the Portuguese Republic, the State of Qatar, Romania, the Russian Federation, the Kingdom of Saudi Arabia, the Slovak Republic, the Republic of Slovenia, the Republic of South Africa, the Kingdom of Spain, the Kingdom of Sweden, the Swiss Confederation, the Republic of Tajikistan, the Kingdom of Thailand, the Republic of Tunisia, the Republic of Turkey, Turkmenistan, Ukraine, the Oriental Republic of Uruguay, the United Kingdom of Great Britain and Northern Ireland, the United Arab Emirates, the United States of America, the Republic of Uzbekistan, and the Socialist Republic of Viet Nam, as well as the Aga Khan Development Network, the Asian Development Bank, the Conference on Interaction and Confidence‐Building Measures in Asia, the Collective Security Treaty Organisation, the Economic Cooperation Organization, the European Union, the International Monetary Fund, the Islamic Development Bank, the North Atlantic Treaty Organization, the Organisation of the Islamic Cooperation, the Organization for Security and Co‐operation in Europe, the South Asian Association for Regional Cooperation, the Shanghai Cooperation Organisation, the United Nations, and the World Bank Group.

Page 1, 5 … Reaffirming our commitments as set out in the 2010 London Communiqué and the Kabul Process, this renewed partnership between Afghanistan and the International Community entails firm mutual commitments in the areas of governance, security, the peace process, economic and social development, and regional cooperation.

Page 2, Governance, 8 … We will move this agenda forward, in accordance with our commitments under the Kabul Process in line with the principle of mutual accountability.
AFG 700 NA 333 NA NA 225 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 0 0 2 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 849 Istanbul Process on Regional Security and Cooperation for a Secure and Stable Afghanistan 2011-11-02 Multiparty signed/agreed 10 21299 InterIntra Imp ExtSub Not signed, agreements mentions the following parties as having produced it: the Islamic Republic of Afghanistan, the People’s Republic of China, the Republic of India, the Islamic Republic of Iran, the Republic of Kazakhstan, the Kyrgyz Republic, the Islamic Republic of Pakistan, the Russian Federation, the Kingdom of Saudi Arabia the Republic of Tajikistan, the Republic of Turkey, Turkmenistan, and the United Arab Emirates. Not signed, agreement mentions the following parties as having supported it: the Commonwealth of Australia, Canada, the Arab Republic of Egypt, the Republic of France, the Federal Republic of Germany, Republic of Italy, Japan, Norway, Republic of Poland, Spain, Sweden, the United Kingdom and the United States as well as the United Nations, Economic Cooperation Organization, Organization for Security and Cooperation in Europe, North Atlantic Treaty Organization, Shanghai Cooperation Organization, South Asian Association for Regional Cooperation, Organization for Islamic Cooperation, the European Union, the Conference on Interaction and Confidence Building Measures in Asia. Page 1, 2 We affirm the commitments enshrined in the 2002 Kabul Declaration of Good Neighbourly Relations and agree that promoting regional security and cooperation requires measures to build confidence and trust among countries AFG 700 NA 333 NA NA 225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 2 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1
Afghanistan Government 2 Afghanistan: 2000s Post-intervention process Europe and Eurasia 709 Renewed Commitment by the Afghan Government to the Afghan People and the International Community to Afghanistan (Kabul Conference Communique) 2010-07-22 Multiparty signed/agreed 9 33137 InterIntra Imp ExtSub Not signed, agreement mentions the following parties as having produced it: The Government of the Islamic Republic of Afghanistan and the international community

Page 2, Principles of Effective Partnership, 8 … In line with the London Conference Communiqué , restated their strong support for channeling at least 50% of development aid through the Afghan Government’s core budget within two years while, as committed at the London Conference, the Afghan Government achieves the necessary reforms to strengthen its public financial management systems, reduce corruption, improve budget execution, and increase revenue collection to finance key National Priority Programmes

Page 3, Governance, Rule of Law, and Human Rights, 9 … Building on the London Conference commitments, the Government of Afghanistan, with the support of its international partners, pledged to…

Page 7, Regional Cooperation, 21 … Participants re-affirmed their support for the objectives and principles laid out in the Kabul Declaration of 2002 on Good Neighborly Relations … Participants further recognized the need for greater regional coordination and extended their support to the inclusive vision set out in the Istanbul Statement on Friendship and Cooperation in the “Heart of Asia” of January 2010, which offers regionally-owned measures for enhanced regional cooperation

Page 7, Regional Cooperation, 23 Participants welcomed the conclusion of the Afghanistan-Pakistan Trade and Transit Agreement (APTTA), and look forward to its successful implementation

Page 8, Regional Cooperation, 24 Participants underlined the importance of: … Integrated regional infrastructure projects, including transport; and encouraged both multilateral organisations and bilateral partners to promote such projects, including those presented in the Regional Cooperation Concept Paper submitted to the Kabul Conference
AFG 700 NA 333 NA NA 225 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 2 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 3 1 0 1 0 1 0 2 2 2 1 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 0 1 0 0 0 1 1 1

Muestro el número de registros, el número de variables y el nombre de las variables.

#Número de registros 
nrow(peace)
## [1] 1789
#Número de variables
ncol(peace)
## [1] 266
#Nombre de las variables
colnames(peace)
##   [1] "ï..Con"       "Contp"        "PP"           "PPName"      
##   [5] "Reg"          "AgtId"        "Agt"          "Dat"         
##   [9] "Status"       "Lgt"          "N_characters" "Agtp"        
##  [13] "Stage"        "StageSub"     "Part"         "ThrdPart"    
##  [17] "OthAgr"       "Loc1ISO"      "Loc2ISO"      "Loc1GWNO"    
##  [21] "Loc2GWNO"     "UcdpCon"      "UcdpAgr"      "PamAgr"      
##  [25] "CowWar"       "GCh"          "GChRhet"      "GChAntid"    
##  [29] "GChSubs"      "GChOth"       "GDis"         "GDisRhet"    
##  [33] "GDisAntid"    "GDisSubs"     "GDisOth"      "GAge"        
##  [37] "GAgeRhet"     "GAgeAntid"    "GAgeSubs"     "GAgeOth"     
##  [41] "GMig"         "GMigRhet"     "GMigAntid"    "GMigSubs"    
##  [45] "GMigOth"      "GRa"          "GRaRhet"      "GRaAntid"    
##  [49] "GRaSubs"      "GRaOth"       "GRe"          "GReRhet"     
##  [53] "GReAntid"     "GReSubs"      "GReOth"       "GInd"        
##  [57] "GIndRhet"     "GIndAntid"    "GIndSubs"     "GIndOth"     
##  [61] "GOth"         "GOthRhet"     "GOthAntid"    "GOthSubs"    
##  [65] "GOthOth"      "GRef"         "GRefRhet"     "GRefSubs"    
##  [69] "GRefOth"      "GSoc"         "GSocRhet"     "GSocAntid"   
##  [73] "GSocSubs"     "GSocOth"      "GeWom"        "GeMe"        
##  [77] "GeMeNu"       "GeMeOth"      "GeSo"         "GeLgbti"     
##  [81] "GeLgbtiPos"   "GeLgbtiNeg"   "GeFa"         "StDef"       
##  [85] "StGen"        "StCon"        "StSd"         "StRef"       
##  [89] "StSym"        "StInd"        "StUni"        "StBor"       
##  [93] "StXbor"       "Pol"          "PolGen"       "PolNewInd"   
##  [97] "PolNewTemp"   "ConRen"       "Cons"         "Ele"         
## [101] "ElecComm"     "PolPar"       "PolParTrans"  "PolParOth"   
## [105] "Civso"        "Tral"         "Pubad"        "Polps"       
## [109] "PpsSt"        "PpsSub"       "PpsEx"        "PpsOro"      
## [113] "PpsOthPr"     "PpsVet"       "PpsAut"       "PpsInt"      
## [117] "PpsOth"       "Terps"        "TpsSub"       "TpsLoc"      
## [121] "TpsAut"       "TpsOth"       "Eps"          "EpsRes"      
## [125] "EpsFis"       "EpsOth"       "Mps"          "MpsMe"       
## [129] "MpsJt"        "MpsPro"       "MpsOth"       "HrGen"       
## [133] "EqGen"        "HrDem"        "Prot"         "ProtCiv"     
## [137] "ProtGrp"      "ProtLgl"      "ProtOth"      "HrFra"       
## [141] "HrfSp"        "HrfBor"       "HrfTinc"      "HrfOth"      
## [145] "HrCp"         "CprLife"      "CprTort"      "CprEq"       
## [149] "CprSlav"      "CprLib"       "CprDet"       "CprFmov"     
## [153] "CprFspe"      "CprFass"      "CprTria"      "CprPriv"     
## [157] "CprVote"      "CprReli"      "CprOth"       "HrSec"       
## [161] "SerProp"      "SerWork"      "SerHeal"      "SerEdu"      
## [165] "SerStdl"      "SerShel"      "SerSs"        "SerCult"     
## [169] "SerOth"       "HrNi"         "HrNiMe"       "HrNiNe"      
## [173] "HrNiOth"      "HrIi"         "HrIiMon"      "HrIiBod"     
## [177] "HrIiOth"      "HrMob"        "HrDet"        "Med"         
## [181] "MedGov"       "MedSubs"      "MedLog"       "MedOth"      
## [185] "HrCit"        "CitGen"       "CitRights"    "CitDef"      
## [189] "CitOth"       "JusCr"        "JusCrSp"      "JusCrSys"    
## [193] "JusCrPow"     "JusEm"        "JusJu"        "JusPri"      
## [197] "JusTra"       "Dev"          "DevSoc"       "DevHum"      
## [201] "DevInfra"     "NEC"          "NatRes"       "IntFu"       
## [205] "Bus"          "Tax"          "TaxPo"        "TaxRef"      
## [209] "TaxOth"       "Ban"          "CenBan"       "BanPers"     
## [213] "BanInt"       "BanXb"        "LaRef"        "LaRefMan"    
## [217] "LaRefRet"     "LaRefOth"     "LaNom"        "LaCH"        
## [221] "LaCHTa"       "LaCHIt"       "LaCHPro"      "LaCHOth"     
## [225] "LaEn"         "Wat"          "SsrGua"       "Ce"          
## [229] "CeProv"       "CeGen"        "SsrPol"       "SsrArm"      
## [233] "SsrDdr"       "DdrDemil"     "DdrProg"      "SsrInt"      
## [237] "SsrPsf"       "SsrFf"        "Cor"          "SsrCrOcr"    
## [241] "SsrDrugs"     "Terr"         "TjGen"        "TjAm"        
## [245] "TjAmPro"      "TjSan"        "TjPower"      "TjAmBan"     
## [249] "TjCou"        "TjJaNc"       "TjJaIc"       "TjMech"      
## [253] "TjPrire"      "TjVet"        "TjVic"        "TjMis"       
## [257] "TjRep"        "TjRSym"       "TjRMa"        "TjNR"        
## [261] "ImUN"         "ImOth"        "ImRef"        "ImPK"        
## [265] "ImE"          "ImSrc"

Cambio los nombres de las variables.

# Muestro la estructura del dataframe
names(peace)[1] <- "Country"
names(peace)[2] <- "Conflict_type"
names(peace)[3] <- "Peace_Process_Number"
names(peace)[4] <- "Peace Process_name"
names(peace)[5] <- "Region"
names(peace)[6] <- "Agreement_Id"
names(peace)[7] <- "Agreement_Name"
names(peace)[8] <- "Date_Signed"
names(peace)[9] <- "Agreement_Definition_and_Status"
names(peace)[10] <- "Agrmnt_length_pages"
names(peace)[11] <- "Agrmnt_length_characters"
names(peace)[12] <- "Agrmnt_Conflict_Type"
names(peace)[13] <- "Agreement_Stage"
names(peace)[14] <- "Sub_stage"
names(peace)[15] <- "Parties"
names(peace)[16] <- "Third_Party"
names(peace)[17] <- "Other_Agreement"
#names(peace)[18] <- "LOC1ISO"
#names(peace)[19] <- "LOC2ISO"
#names(peace)[20] <- "Loc1GWNO"
#names(peace)[21] <- "Loc2GWNO"
names(peace)[22] <- "Uppsala_Conflict_Data_Program_Conflict_ID"
names(peace)[23] <- "Uppsala_Conflict_Data_Program_Peace_Agreement"
names(peace)[24] <- "Peace_Accord_Matrix_Agrmnt"
names(peace)[25] <- "Correlates_War"

Los vuelvo a mostrar

#Nombre de las variables
colnames(peace)
##   [1] "Country"                                      
##   [2] "Conflict_type"                                
##   [3] "Peace_Process_Number"                         
##   [4] "Peace Process_name"                           
##   [5] "Region"                                       
##   [6] "Agreement_Id"                                 
##   [7] "Agreement_Name"                               
##   [8] "Date_Signed"                                  
##   [9] "Agreement_Definition_and_Status"              
##  [10] "Agrmnt_length_pages"                          
##  [11] "Agrmnt_length_characters"                     
##  [12] "Agrmnt_Conflict_Type"                         
##  [13] "Agreement_Stage"                              
##  [14] "Sub_stage"                                    
##  [15] "Parties"                                      
##  [16] "Third_Party"                                  
##  [17] "Other_Agreement"                              
##  [18] "Loc1ISO"                                      
##  [19] "Loc2ISO"                                      
##  [20] "Loc1GWNO"                                     
##  [21] "Loc2GWNO"                                     
##  [22] "Uppsala_Conflict_Data_Program_Conflict_ID"    
##  [23] "Uppsala_Conflict_Data_Program_Peace_Agreement"
##  [24] "Peace_Accord_Matrix_Agrmnt"                   
##  [25] "Correlates_War"                               
##  [26] "GCh"                                          
##  [27] "GChRhet"                                      
##  [28] "GChAntid"                                     
##  [29] "GChSubs"                                      
##  [30] "GChOth"                                       
##  [31] "GDis"                                         
##  [32] "GDisRhet"                                     
##  [33] "GDisAntid"                                    
##  [34] "GDisSubs"                                     
##  [35] "GDisOth"                                      
##  [36] "GAge"                                         
##  [37] "GAgeRhet"                                     
##  [38] "GAgeAntid"                                    
##  [39] "GAgeSubs"                                     
##  [40] "GAgeOth"                                      
##  [41] "GMig"                                         
##  [42] "GMigRhet"                                     
##  [43] "GMigAntid"                                    
##  [44] "GMigSubs"                                     
##  [45] "GMigOth"                                      
##  [46] "GRa"                                          
##  [47] "GRaRhet"                                      
##  [48] "GRaAntid"                                     
##  [49] "GRaSubs"                                      
##  [50] "GRaOth"                                       
##  [51] "GRe"                                          
##  [52] "GReRhet"                                      
##  [53] "GReAntid"                                     
##  [54] "GReSubs"                                      
##  [55] "GReOth"                                       
##  [56] "GInd"                                         
##  [57] "GIndRhet"                                     
##  [58] "GIndAntid"                                    
##  [59] "GIndSubs"                                     
##  [60] "GIndOth"                                      
##  [61] "GOth"                                         
##  [62] "GOthRhet"                                     
##  [63] "GOthAntid"                                    
##  [64] "GOthSubs"                                     
##  [65] "GOthOth"                                      
##  [66] "GRef"                                         
##  [67] "GRefRhet"                                     
##  [68] "GRefSubs"                                     
##  [69] "GRefOth"                                      
##  [70] "GSoc"                                         
##  [71] "GSocRhet"                                     
##  [72] "GSocAntid"                                    
##  [73] "GSocSubs"                                     
##  [74] "GSocOth"                                      
##  [75] "GeWom"                                        
##  [76] "GeMe"                                         
##  [77] "GeMeNu"                                       
##  [78] "GeMeOth"                                      
##  [79] "GeSo"                                         
##  [80] "GeLgbti"                                      
##  [81] "GeLgbtiPos"                                   
##  [82] "GeLgbtiNeg"                                   
##  [83] "GeFa"                                         
##  [84] "StDef"                                        
##  [85] "StGen"                                        
##  [86] "StCon"                                        
##  [87] "StSd"                                         
##  [88] "StRef"                                        
##  [89] "StSym"                                        
##  [90] "StInd"                                        
##  [91] "StUni"                                        
##  [92] "StBor"                                        
##  [93] "StXbor"                                       
##  [94] "Pol"                                          
##  [95] "PolGen"                                       
##  [96] "PolNewInd"                                    
##  [97] "PolNewTemp"                                   
##  [98] "ConRen"                                       
##  [99] "Cons"                                         
## [100] "Ele"                                          
## [101] "ElecComm"                                     
## [102] "PolPar"                                       
## [103] "PolParTrans"                                  
## [104] "PolParOth"                                    
## [105] "Civso"                                        
## [106] "Tral"                                         
## [107] "Pubad"                                        
## [108] "Polps"                                        
## [109] "PpsSt"                                        
## [110] "PpsSub"                                       
## [111] "PpsEx"                                        
## [112] "PpsOro"                                       
## [113] "PpsOthPr"                                     
## [114] "PpsVet"                                       
## [115] "PpsAut"                                       
## [116] "PpsInt"                                       
## [117] "PpsOth"                                       
## [118] "Terps"                                        
## [119] "TpsSub"                                       
## [120] "TpsLoc"                                       
## [121] "TpsAut"                                       
## [122] "TpsOth"                                       
## [123] "Eps"                                          
## [124] "EpsRes"                                       
## [125] "EpsFis"                                       
## [126] "EpsOth"                                       
## [127] "Mps"                                          
## [128] "MpsMe"                                        
## [129] "MpsJt"                                        
## [130] "MpsPro"                                       
## [131] "MpsOth"                                       
## [132] "HrGen"                                        
## [133] "EqGen"                                        
## [134] "HrDem"                                        
## [135] "Prot"                                         
## [136] "ProtCiv"                                      
## [137] "ProtGrp"                                      
## [138] "ProtLgl"                                      
## [139] "ProtOth"                                      
## [140] "HrFra"                                        
## [141] "HrfSp"                                        
## [142] "HrfBor"                                       
## [143] "HrfTinc"                                      
## [144] "HrfOth"                                       
## [145] "HrCp"                                         
## [146] "CprLife"                                      
## [147] "CprTort"                                      
## [148] "CprEq"                                        
## [149] "CprSlav"                                      
## [150] "CprLib"                                       
## [151] "CprDet"                                       
## [152] "CprFmov"                                      
## [153] "CprFspe"                                      
## [154] "CprFass"                                      
## [155] "CprTria"                                      
## [156] "CprPriv"                                      
## [157] "CprVote"                                      
## [158] "CprReli"                                      
## [159] "CprOth"                                       
## [160] "HrSec"                                        
## [161] "SerProp"                                      
## [162] "SerWork"                                      
## [163] "SerHeal"                                      
## [164] "SerEdu"                                       
## [165] "SerStdl"                                      
## [166] "SerShel"                                      
## [167] "SerSs"                                        
## [168] "SerCult"                                      
## [169] "SerOth"                                       
## [170] "HrNi"                                         
## [171] "HrNiMe"                                       
## [172] "HrNiNe"                                       
## [173] "HrNiOth"                                      
## [174] "HrIi"                                         
## [175] "HrIiMon"                                      
## [176] "HrIiBod"                                      
## [177] "HrIiOth"                                      
## [178] "HrMob"                                        
## [179] "HrDet"                                        
## [180] "Med"                                          
## [181] "MedGov"                                       
## [182] "MedSubs"                                      
## [183] "MedLog"                                       
## [184] "MedOth"                                       
## [185] "HrCit"                                        
## [186] "CitGen"                                       
## [187] "CitRights"                                    
## [188] "CitDef"                                       
## [189] "CitOth"                                       
## [190] "JusCr"                                        
## [191] "JusCrSp"                                      
## [192] "JusCrSys"                                     
## [193] "JusCrPow"                                     
## [194] "JusEm"                                        
## [195] "JusJu"                                        
## [196] "JusPri"                                       
## [197] "JusTra"                                       
## [198] "Dev"                                          
## [199] "DevSoc"                                       
## [200] "DevHum"                                       
## [201] "DevInfra"                                     
## [202] "NEC"                                          
## [203] "NatRes"                                       
## [204] "IntFu"                                        
## [205] "Bus"                                          
## [206] "Tax"                                          
## [207] "TaxPo"                                        
## [208] "TaxRef"                                       
## [209] "TaxOth"                                       
## [210] "Ban"                                          
## [211] "CenBan"                                       
## [212] "BanPers"                                      
## [213] "BanInt"                                       
## [214] "BanXb"                                        
## [215] "LaRef"                                        
## [216] "LaRefMan"                                     
## [217] "LaRefRet"                                     
## [218] "LaRefOth"                                     
## [219] "LaNom"                                        
## [220] "LaCH"                                         
## [221] "LaCHTa"                                       
## [222] "LaCHIt"                                       
## [223] "LaCHPro"                                      
## [224] "LaCHOth"                                      
## [225] "LaEn"                                         
## [226] "Wat"                                          
## [227] "SsrGua"                                       
## [228] "Ce"                                           
## [229] "CeProv"                                       
## [230] "CeGen"                                        
## [231] "SsrPol"                                       
## [232] "SsrArm"                                       
## [233] "SsrDdr"                                       
## [234] "DdrDemil"                                     
## [235] "DdrProg"                                      
## [236] "SsrInt"                                       
## [237] "SsrPsf"                                       
## [238] "SsrFf"                                        
## [239] "Cor"                                          
## [240] "SsrCrOcr"                                     
## [241] "SsrDrugs"                                     
## [242] "Terr"                                         
## [243] "TjGen"                                        
## [244] "TjAm"                                         
## [245] "TjAmPro"                                      
## [246] "TjSan"                                        
## [247] "TjPower"                                      
## [248] "TjAmBan"                                      
## [249] "TjCou"                                        
## [250] "TjJaNc"                                       
## [251] "TjJaIc"                                       
## [252] "TjMech"                                       
## [253] "TjPrire"                                      
## [254] "TjVet"                                        
## [255] "TjVic"                                        
## [256] "TjMis"                                        
## [257] "TjRep"                                        
## [258] "TjRSym"                                       
## [259] "TjRMa"                                        
## [260] "TjNR"                                         
## [261] "ImUN"                                         
## [262] "ImOth"                                        
## [263] "ImRef"                                        
## [264] "ImPK"                                         
## [265] "ImE"                                          
## [266] "ImSrc"

Se han cargado por tanto las 266 variables y 1789 registros que comentaba el enunciado. Valido el tipo de datos que se han leido.

Muestro el tipo de cada variable.

# Muestro la estructura del dataframe
str(peace, list.len=ncol(peace))
## 'data.frame':    1789 obs. of  266 variables:
##  $ Country                                      : Factor w/ 169 levels "(Bougainville)/(United Nations)",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ Conflict_type                                : Factor w/ 5 levels "Government","Government/territory",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Peace_Process_Number                         : int  2 2 2 2 2 2 2 2 2 2 ...
##  $ Peace Process_name                           : Factor w/ 152 levels "","Abkhazia peace process",..: 4 4 4 4 4 4 4 4 4 4 ...
##  $ Region                                       : Factor w/ 6 levels "Africa (excl MENA)",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ Agreement_Id                                 : int  1739 1923 864 848 849 709 708 707 706 847 ...
##  $ Agreement_Name                               : Factor w/ 1753 levels "'Hudnaâ\200\231 (truce) of al-Zabadani, Kefriyya and al-Fuâ\200\231aa",..: 269 291 1697 674 982 1468 1679 621 1569 776 ...
##  $ Date_Signed                                  : Factor w/ 1470 levels "1990-02-15","1990-03-01",..: 1353 1238 1138 1102 1097 1053 1050 1038 1006 1005 ...
##  $ Agreement_Definition_and_Status              : Factor w/ 4 levels "Agreement with subsequent status",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Agrmnt_length_pages                          : int  4 4 14 7 10 9 4 7 4 3 ...
##  $ Agrmnt_length_characters                     : int  10203 11110 39746 24106 21299 33137 9289 27077 9555 5677 ...
##  $ Agrmnt_Conflict_Type                         : Factor w/ 4 levels "Inter","InterIntra",..: 3 3 2 2 2 2 3 2 2 2 ...
##  $ Agreement_Stage                              : Factor w/ 7 levels "Cea","Imp","Oth",..: 7 2 2 4 2 2 4 2 7 2 ...
##  $ Sub_stage                                    : Factor w/ 22 levels "","CeaMix","Ceas",..: 13 6 6 16 6 6 14 6 13 6 ...
##  $ Parties                                      : Factor w/ 1683 levels "","'YATAMA' Atlantic Front of the Nicaraguan Resistance; Nicaraguan Govt General, Rep of the Elected Govt of Nicaragua",..: 1214 342 1042 1041 1052 1045 1048 1046 1053 1049 ...
##  $ Third_Party                                  : Factor w/ 851 levels "","'As witnesses': Cuban ambassador to Colombia, Spanish ambassador to Switzerland, Spanish ambassador to Colombia"| __truncated__,..: 1 544 102 1 360 1 1 1 362 1 ...
##  $ Other_Agreement                              : Factor w/ 927 levels "","- 1 February 2008 agreement by the Parties to deal with long-term issues and solutions",..: 1 780 737 423 398 743 1 429 525 731 ...
##  $ Loc1ISO                                      : Factor w/ 82 levels "","AFG","AGO",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Loc2ISO                                      : Factor w/ 30 levels "","ARM","ERI",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Loc1GWNO                                     : int  700 700 700 700 700 700 700 700 700 700 ...
##  $ Loc2GWNO                                     : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Uppsala_Conflict_Data_Program_Conflict_ID    : Factor w/ 111 levels "","11344","11345",..: 53 53 53 53 53 53 53 53 53 53 ...
##  $ Uppsala_Conflict_Data_Program_Peace_Agreement: num  1488 NA NA NA NA ...
##  $ Peace_Accord_Matrix_Agrmnt                   : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Correlates_War                               : int  851 225 225 225 225 225 225 225 225 225 ...
##  $ GCh                                          : int  0 2 1 1 0 2 1 0 0 0 ...
##  $ GChRhet                                      : int  0 1 1 1 0 0 1 0 0 0 ...
##  $ GChAntid                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GChSubs                                      : int  0 1 0 0 0 1 0 0 0 0 ...
##  $ GChOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GDis                                         : int  0 2 0 0 0 0 0 0 0 0 ...
##  $ GDisRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GDisAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GDisSubs                                     : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ GDisOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GAge                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GAgeRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GAgeAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GAgeSubs                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GAgeOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GMig                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GMigRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GMigAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GMigSubs                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GMigOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GRa                                          : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ GRaRhet                                      : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ GRaAntid                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GRaSubs                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GRaOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GRe                                          : int  0 0 0 0 0 0 2 0 0 0 ...
##  $ GReRhet                                      : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ GReAntid                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GReSubs                                      : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ GReOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GInd                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GIndRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GIndAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GIndSubs                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GIndOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GOth                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GOthRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GOthAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GOthSubs                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GOthOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GRef                                         : int  2 0 1 1 1 1 1 1 0 0 ...
##  $ GRefRhet                                     : int  0 0 1 1 1 1 0 1 0 0 ...
##  $ GRefSubs                                     : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ GRefOth                                      : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ GSoc                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GSocRhet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GSocAntid                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GSocSubs                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GSocOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeWom                                        : int  1 1 1 1 1 1 1 1 1 0 ...
##  $ GeMe                                         : int  0 0 1 1 0 1 0 1 1 0 ...
##  $ GeMeNu                                       : int  0 0 1 1 0 1 0 1 1 0 ...
##  $ GeMeOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeSo                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeLgbti                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeLgbtiPos                                   : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeLgbtiNeg                                   : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ GeFa                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StDef                                        : int  1 0 1 1 1 1 0 1 1 1 ...
##  $ StGen                                        : int  0 0 1 1 1 1 0 1 1 1 ...
##  $ StCon                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StSd                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StRef                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StSym                                        : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ StInd                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StUni                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StBor                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ StXbor                                       : int  0 0 1 0 0 0 0 0 0 0 ...
##  $ Pol                                          : int  1 1 0 0 0 0 0 0 1 0 ...
##  $ PolGen                                       : int  1 0 0 0 0 0 0 0 1 0 ...
##  $ PolNewInd                                    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PolNewTemp                                   : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ ConRen                                       : int  0 0 2 2 0 0 0 2 0 0 ...
##  $ Cons                                         : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ Ele                                          : int  1 1 2 0 0 1 0 1 1 0 ...
##  $ ElecComm                                     : int  0 0 0 0 0 0 0 1 0 0 ...
##  $ PolPar                                       : int  2 0 0 0 0 0 0 0 0 0 ...
##  $ PolParTrans                                  : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PolParOth                                    : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ Civso                                        : int  0 0 1 1 0 1 1 1 1 0 ...
##  $ Tral                                         : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ Pubad                                        : int  0 2 0 1 0 2 0 1 0 0 ...
##  $ Polps                                        : int  0 3 0 0 0 0 1 0 0 0 ...
##  $ PpsSt                                        : int  0 1 0 0 0 0 1 0 0 0 ...
##  $ PpsSub                                       : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ PpsEx                                        : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ PpsOro                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PpsOthPr                                     : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ PpsVet                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PpsAut                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PpsInt                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ PpsOth                                       : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ Terps                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TpsSub                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TpsLoc                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TpsAut                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TpsOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Eps                                          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ EpsRes                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ EpsFis                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ EpsOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Mps                                          : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MpsMe                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MpsJt                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MpsPro                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MpsOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrGen                                        : int  0 1 1 1 1 1 1 1 1 0 ...
##  $ EqGen                                        : int  1 0 1 1 0 1 1 1 0 0 ...
##  $ HrDem                                        : int  0 0 2 2 1 0 0 1 1 1 ...
##  $ Prot                                         : int  0 0 1 1 0 2 0 0 0 0 ...
##  $ ProtCiv                                      : int  0 0 1 1 0 1 0 0 0 0 ...
##  $ ProtGrp                                      : int  0 0 0 0 0 1 0 0 0 0 ...
##  $ ProtLgl                                      : int  0 0 1 0 0 1 0 0 0 0 ...
##  $ ProtOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrFra                                        : int  0 0 3 0 0 1 0 1 0 0 ...
##  $ HrfSp                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrfBor                                       : int  0 0 0 0 0 1 0 1 0 0 ...
##  $ HrfTinc                                      : int  0 0 1 0 0 0 0 0 0 0 ...
##  $ HrfOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrCp                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprLife                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprTort                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprEq                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprSlav                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprLib                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprDet                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprFmov                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprFspe                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprFass                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprTria                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprPriv                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprVote                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprReli                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CprOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrSec                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerProp                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerWork                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerHeal                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerEdu                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerStdl                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerShel                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerSs                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerCult                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SerOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrNi                                         : int  0 0 1 0 0 1 0 1 0 0 ...
##  $ HrNiMe                                       : int  0 0 1 0 0 1 0 1 0 0 ...
##  $ HrNiNe                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrNiOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrIi                                         : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrIiMon                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrIiBod                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrIiOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrMob                                        : int  0 0 0 0 1 0 0 0 0 0 ...
##  $ HrDet                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Med                                          : int  0 0 1 0 1 0 1 1 0 0 ...
##  $ MedGov                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MedSubs                                      : int  0 0 1 0 1 0 1 1 0 0 ...
##  $ MedLog                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ MedOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ HrCit                                        : int  0 0 0 2 0 2 1 2 0 0 ...
##  $ CitGen                                       : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ CitRights                                    : int  0 0 0 1 0 1 0 1 0 0 ...
##  $ CitDef                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CitOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ JusCr                                        : int  0 0 0 0 0 1 0 1 0 0 ...
##  $ JusCrSp                                      : int  0 0 0 0 0 1 0 0 0 0 ...
##  $ JusCrSys                                     : int  0 0 0 0 0 1 0 1 0 0 ...
##  $ JusCrPow                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ JusEm                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ JusJu                                        : int  0 0 0 0 0 1 0 0 1 0 ...
##  $ JusPri                                       : int  0 0 0 0 0 0 0 1 0 0 ...
##  $ JusTra                                       : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ Dev                                          : int  0 0 1 2 1 1 1 1 1 1 ...
##  $ DevSoc                                       : int  0 0 1 1 1 1 1 1 1 1 ...
##  $ DevHum                                       : int  0 0 0 0 0 0 0 1 0 0 ...
##  $ DevInfra                                     : int  0 0 0 0 1 1 0 0 1 1 ...
##  $ NEC                                          : int  0 0 1 1 0 1 0 1 1 0 ...
##  $ NatRes                                       : int  0 0 1 1 1 1 0 1 1 0 ...
##  $ IntFu                                        : int  0 0 1 1 1 1 1 1 1 1 ...
##  $ Bus                                          : int  0 0 1 1 1 1 0 0 1 0 ...
##  $ Tax                                          : int  0 0 1 0 0 0 0 1 1 0 ...
##  $ TaxPo                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TaxRef                                       : int  0 0 1 0 0 0 0 1 1 0 ...
##  $ TaxOth                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Ban                                          : int  0 0 1 0 0 1 0 0 0 0 ...
##  $ CenBan                                       : int  0 0 1 0 0 0 0 0 0 0 ...
##  $ BanPers                                      : int  0 0 1 0 0 0 0 0 0 0 ...
##  $ BanInt                                       : int  0 0 1 0 0 1 0 0 0 0 ...
##  $ BanXb                                        : int  0 0 1 0 0 0 0 0 0 0 ...
##  $ LaRef                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaRefMan                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaRefRet                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaRefOth                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaNom                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaCH                                         : int  0 0 1 0 1 0 0 0 0 0 ...
##  $ LaCHTa                                       : int  0 0 0 0 1 0 0 0 0 0 ...
##  $ LaCHIt                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaCHPro                                      : int  0 0 1 0 1 0 0 0 0 0 ...
##  $ LaCHOth                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ LaEn                                         : int  0 0 1 1 1 0 0 1 0 0 ...
##  $ Wat                                          : int  0 0 0 0 1 0 0 0 1 0 ...
##  $ SsrGua                                       : int  0 0 1 1 1 1 1 1 1 1 ...
##  $ Ce                                           : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ CeProv                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ CeGen                                        : int  1 0 0 0 0 0 0 0 0 0 ...
##  $ SsrPol                                       : int  0 0 1 1 0 1 0 1 1 1 ...
##  $ SsrArm                                       : int  0 0 1 1 0 3 1 2 1 0 ...
##  $ SsrDdr                                       : int  2 0 1 1 1 1 0 1 1 0 ...
##  $ DdrDemil                                     : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ DdrProg                                      : int  1 0 1 1 1 1 0 1 1 0 ...
##  $ SsrInt                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SsrPsf                                       : int  1 0 0 0 0 1 1 1 0 0 ...
##  $ SsrFf                                        : int  1 0 1 1 0 0 0 0 0 0 ...
##  $ Cor                                          : int  0 1 2 1 2 2 1 2 0 0 ...
##  $ SsrCrOcr                                     : int  0 0 2 0 0 2 0 2 1 2 ...
##  $ SsrDrugs                                     : int  0 0 2 1 2 2 0 2 1 1 ...
##  $ Terr                                         : int  1 0 1 1 1 1 1 1 1 1 ...
##  $ TjGen                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjAm                                         : int  0 0 0 0 0 0 2 0 0 0 ...
##  $ TjAmPro                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjSan                                        : int  0 0 0 0 0 0 1 0 0 0 ...
##  $ TjPower                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjAmBan                                      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjCou                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjJaNc                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjJaIc                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjMech                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjPrire                                      : int  3 0 0 0 0 2 2 0 0 0 ...
##  $ TjVet                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjVic                                        : int  0 0 1 0 0 1 0 0 0 0 ...
##  $ TjMis                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjRep                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjRSym                                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjRMa                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ TjNR                                         : int  0 0 1 1 1 1 1 1 0 0 ...
##  $ ImUN                                         : int  0 1 0 1 0 0 0 0 0 0 ...
##  $ ImOth                                        : int  0 1 0 0 0 0 0 0 0 0 ...
##  $ ImRef                                        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ ImPK                                         : int  0 0 0 0 0 1 0 1 1 0 ...
##  $ ImE                                          : int  1 0 1 0 0 1 0 0 0 0 ...
##  $ ImSrc                                        : int  1 1 1 1 1 1 1 1 1 1 ...
# Muestro el tipo de cada variable formateado con kable
vartypes <- data.table(variable = colnames(peace), clase = sapply(peace, class))
kable(vartypes, caption = "Asignación de clase de objeto R a cada variable") %>%
  kable_styling("striped", full_width = T)
Asignación de clase de objeto R a cada variable
variable clase
Country factor
Conflict_type factor
Peace_Process_Number integer
Peace Process_name factor
Region factor
Agreement_Id integer
Agreement_Name factor
Date_Signed factor
Agreement_Definition_and_Status factor
Agrmnt_length_pages integer
Agrmnt_length_characters integer
Agrmnt_Conflict_Type factor
Agreement_Stage factor
Sub_stage factor
Parties factor
Third_Party factor
Other_Agreement factor
Loc1ISO factor
Loc2ISO factor
Loc1GWNO integer
Loc2GWNO integer
Uppsala_Conflict_Data_Program_Conflict_ID factor
Uppsala_Conflict_Data_Program_Peace_Agreement numeric
Peace_Accord_Matrix_Agrmnt integer
Correlates_War integer
GCh integer
GChRhet integer
GChAntid integer
GChSubs integer
GChOth integer
GDis integer
GDisRhet integer
GDisAntid integer
GDisSubs integer
GDisOth integer
GAge integer
GAgeRhet integer
GAgeAntid integer
GAgeSubs integer
GAgeOth integer
GMig integer
GMigRhet integer
GMigAntid integer
GMigSubs integer
GMigOth integer
GRa integer
GRaRhet integer
GRaAntid integer
GRaSubs integer
GRaOth integer
GRe integer
GReRhet integer
GReAntid integer
GReSubs integer
GReOth integer
GInd integer
GIndRhet integer
GIndAntid integer
GIndSubs integer
GIndOth integer
GOth integer
GOthRhet integer
GOthAntid integer
GOthSubs integer
GOthOth integer
GRef integer
GRefRhet integer
GRefSubs integer
GRefOth integer
GSoc integer
GSocRhet integer
GSocAntid integer
GSocSubs integer
GSocOth integer
GeWom integer
GeMe integer
GeMeNu integer
GeMeOth integer
GeSo integer
GeLgbti integer
GeLgbtiPos integer
GeLgbtiNeg integer
GeFa integer
StDef integer
StGen integer
StCon integer
StSd integer
StRef integer
StSym integer
StInd integer
StUni integer
StBor integer
StXbor integer
Pol integer
PolGen integer
PolNewInd integer
PolNewTemp integer
ConRen integer
Cons integer
Ele integer
ElecComm integer
PolPar integer
PolParTrans integer
PolParOth integer
Civso integer
Tral integer
Pubad integer
Polps integer
PpsSt integer
PpsSub integer
PpsEx integer
PpsOro integer
PpsOthPr integer
PpsVet integer
PpsAut integer
PpsInt integer
PpsOth integer
Terps integer
TpsSub integer
TpsLoc integer
TpsAut integer
TpsOth integer
Eps integer
EpsRes integer
EpsFis integer
EpsOth integer
Mps integer
MpsMe integer
MpsJt integer
MpsPro integer
MpsOth integer
HrGen integer
EqGen integer
HrDem integer
Prot integer
ProtCiv integer
ProtGrp integer
ProtLgl integer
ProtOth integer
HrFra integer
HrfSp integer
HrfBor integer
HrfTinc integer
HrfOth integer
HrCp integer
CprLife integer
CprTort integer
CprEq integer
CprSlav integer
CprLib integer
CprDet integer
CprFmov integer
CprFspe integer
CprFass integer
CprTria integer
CprPriv integer
CprVote integer
CprReli integer
CprOth integer
HrSec integer
SerProp integer
SerWork integer
SerHeal integer
SerEdu integer
SerStdl integer
SerShel integer
SerSs integer
SerCult integer
SerOth integer
HrNi integer
HrNiMe integer
HrNiNe integer
HrNiOth integer
HrIi integer
HrIiMon integer
HrIiBod integer
HrIiOth integer
HrMob integer
HrDet integer
Med integer
MedGov integer
MedSubs integer
MedLog integer
MedOth integer
HrCit integer
CitGen integer
CitRights integer
CitDef integer
CitOth integer
JusCr integer
JusCrSp integer
JusCrSys integer
JusCrPow integer
JusEm integer
JusJu integer
JusPri integer
JusTra integer
Dev integer
DevSoc integer
DevHum integer
DevInfra integer
NEC integer
NatRes integer
IntFu integer
Bus integer
Tax integer
TaxPo integer
TaxRef integer
TaxOth integer
Ban integer
CenBan integer
BanPers integer
BanInt integer
BanXb integer
LaRef integer
LaRefMan integer
LaRefRet integer
LaRefOth integer
LaNom integer
LaCH integer
LaCHTa integer
LaCHIt integer
LaCHPro integer
LaCHOth integer
LaEn integer
Wat integer
SsrGua integer
Ce integer
CeProv integer
CeGen integer
SsrPol integer
SsrArm integer
SsrDdr integer
DdrDemil integer
DdrProg integer
SsrInt integer
SsrPsf integer
SsrFf integer
Cor integer
SsrCrOcr integer
SsrDrugs integer
Terr integer
TjGen integer
TjAm integer
TjAmPro integer
TjSan integer
TjPower integer
TjAmBan integer
TjCou integer
TjJaNc integer
TjJaIc integer
TjMech integer
TjPrire integer
TjVet integer
TjVic integer
TjMis integer
TjRep integer
TjRSym integer
TjRMa integer
TjNR integer
ImUN integer
ImOth integer
ImRef integer
ImPK integer
ImE integer
ImSrc integer

Se observa como a partir de la columna “GCh”, todas las columnas se han leido como “integer”, pero deberia ser “factor”, al tratarse de una variable categórica binaria. Procedo a corregirlo.

# Hallo el número de columna de la variable GCh
which(colnames(peace)=="GCh")
## [1] 26
# Corrijo los tipos de las variable de peace desde la columna 26

for (i in 26:ncol(peace)) {
  if (class(peace[,i]) == "integer") {
      peace[,i]<- as.factor(peace[,i])
  }
}
str(peace, list.len=ncol(peace))
## 'data.frame':    1789 obs. of  266 variables:
##  $ Country                                      : Factor w/ 169 levels "(Bougainville)/(United Nations)",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ Conflict_type                                : Factor w/ 5 levels "Government","Government/territory",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Peace_Process_Number                         : int  2 2 2 2 2 2 2 2 2 2 ...
##  $ Peace Process_name                           : Factor w/ 152 levels "","Abkhazia peace process",..: 4 4 4 4 4 4 4 4 4 4 ...
##  $ Region                                       : Factor w/ 6 levels "Africa (excl MENA)",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ Agreement_Id                                 : int  1739 1923 864 848 849 709 708 707 706 847 ...
##  $ Agreement_Name                               : Factor w/ 1753 levels "'Hudnaâ\200\231 (truce) of al-Zabadani, Kefriyya and al-Fuâ\200\231aa",..: 269 291 1697 674 982 1468 1679 621 1569 776 ...
##  $ Date_Signed                                  : Factor w/ 1470 levels "1990-02-15","1990-03-01",..: 1353 1238 1138 1102 1097 1053 1050 1038 1006 1005 ...
##  $ Agreement_Definition_and_Status              : Factor w/ 4 levels "Agreement with subsequent status",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Agrmnt_length_pages                          : int  4 4 14 7 10 9 4 7 4 3 ...
##  $ Agrmnt_length_characters                     : int  10203 11110 39746 24106 21299 33137 9289 27077 9555 5677 ...
##  $ Agrmnt_Conflict_Type                         : Factor w/ 4 levels "Inter","InterIntra",..: 3 3 2 2 2 2 3 2 2 2 ...
##  $ Agreement_Stage                              : Factor w/ 7 levels "Cea","Imp","Oth",..: 7 2 2 4 2 2 4 2 7 2 ...
##  $ Sub_stage                                    : Factor w/ 22 levels "","CeaMix","Ceas",..: 13 6 6 16 6 6 14 6 13 6 ...
##  $ Parties                                      : Factor w/ 1683 levels "","'YATAMA' Atlantic Front of the Nicaraguan Resistance; Nicaraguan Govt General, Rep of the Elected Govt of Nicaragua",..: 1214 342 1042 1041 1052 1045 1048 1046 1053 1049 ...
##  $ Third_Party                                  : Factor w/ 851 levels "","'As witnesses': Cuban ambassador to Colombia, Spanish ambassador to Switzerland, Spanish ambassador to Colombia"| __truncated__,..: 1 544 102 1 360 1 1 1 362 1 ...
##  $ Other_Agreement                              : Factor w/ 927 levels "","- 1 February 2008 agreement by the Parties to deal with long-term issues and solutions",..: 1 780 737 423 398 743 1 429 525 731 ...
##  $ Loc1ISO                                      : Factor w/ 82 levels "","AFG","AGO",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Loc2ISO                                      : Factor w/ 30 levels "","ARM","ERI",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Loc1GWNO                                     : int  700 700 700 700 700 700 700 700 700 700 ...
##  $ Loc2GWNO                                     : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Uppsala_Conflict_Data_Program_Conflict_ID    : Factor w/ 111 levels "","11344","11345",..: 53 53 53 53 53 53 53 53 53 53 ...
##  $ Uppsala_Conflict_Data_Program_Peace_Agreement: num  1488 NA NA NA NA ...
##  $ Peace_Accord_Matrix_Agrmnt                   : int  NA NA NA NA NA NA NA NA NA NA ...
##  $ Correlates_War                               : int  851 225 225 225 225 225 225 225 225 225 ...
##  $ GCh                                          : Factor w/ 4 levels "0","1","2","3": 1 3 2 2 1 3 2 1 1 1 ...
##  $ GChRhet                                      : Factor w/ 2 levels "0","1": 1 2 2 2 1 1 2 1 1 1 ...
##  $ GChAntid                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GChSubs                                      : Factor w/ 2 levels "0","1": 1 2 1 1 1 2 1 1 1 1 ...
##  $ GChOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GDis                                         : Factor w/ 4 levels "0","1","2","3": 1 3 1 1 1 1 1 1 1 1 ...
##  $ GDisRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GDisAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GDisSubs                                     : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 1 1 ...
##  $ GDisOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GAge                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GAgeRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GAgeAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GAgeSubs                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GAgeOth                                      : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GMig                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GMigRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GMigAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GMigSubs                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GMigOth                                      : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GRa                                          : Factor w/ 4 levels "0","1","2","3": 2 1 1 1 1 1 1 1 1 1 ...
##  $ GRaRhet                                      : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ GRaAntid                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GRaSubs                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GRaOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GRe                                          : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 3 1 1 1 ...
##  $ GReRhet                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ GReAntid                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GReSubs                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ GReOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GInd                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GIndRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GIndAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GIndSubs                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GIndOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GOth                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GOthRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GOthAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GOthSubs                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GOthOth                                      : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GRef                                         : Factor w/ 4 levels "0","1","2","3": 3 1 2 2 2 2 2 2 1 1 ...
##  $ GRefRhet                                     : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 1 2 1 1 ...
##  $ GRefSubs                                     : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ GRefOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ GSoc                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GSocRhet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GSocAntid                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GSocSubs                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GSocOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeWom                                        : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 1 ...
##  $ GeMe                                         : Factor w/ 2 levels "0","1": 1 1 2 2 1 2 1 2 2 1 ...
##  $ GeMeNu                                       : Factor w/ 2 levels "0","1": 1 1 2 2 1 2 1 2 2 1 ...
##  $ GeMeOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeSo                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeLgbti                                      : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeLgbtiPos                                   : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeLgbtiNeg                                   : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ GeFa                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StDef                                        : Factor w/ 2 levels "0","1": 2 1 2 2 2 2 1 2 2 2 ...
##  $ StGen                                        : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 1 2 2 2 ...
##  $ StCon                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StSd                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StRef                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StSym                                        : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ StInd                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StUni                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StBor                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ StXbor                                       : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 1 1 1 ...
##  $ Pol                                          : Factor w/ 4 levels "0","1","2","3": 2 2 1 1 1 1 1 1 2 1 ...
##  $ PolGen                                       : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 2 1 ...
##  $ PolNewInd                                    : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PolNewTemp                                   : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 1 1 ...
##  $ ConRen                                       : Factor w/ 4 levels "0","1","2","3": 1 1 3 3 1 1 1 3 1 1 ...
##  $ Cons                                         : Factor w/ 4 levels "0","1","2","3": 1 2 1 1 1 1 1 1 1 1 ...
##  $ Ele                                          : Factor w/ 4 levels "0","1","2","3": 2 2 3 1 1 2 1 2 2 1 ...
##  $ ElecComm                                     : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 2 1 1 ...
##  $ PolPar                                       : Factor w/ 4 levels "0","1","2","3": 3 1 1 1 1 1 1 1 1 1 ...
##  $ PolParTrans                                  : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PolParOth                                    : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ Civso                                        : Factor w/ 2 levels "0","1": 1 1 2 2 1 2 2 2 2 1 ...
##  $ Tral                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ Pubad                                        : Factor w/ 4 levels "0","1","2","3": 1 3 1 2 1 3 1 2 1 1 ...
##  $ Polps                                        : Factor w/ 4 levels "0","1","2","3": 1 4 1 1 1 1 2 1 1 1 ...
##  $ PpsSt                                        : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 2 1 1 1 ...
##  $ PpsSub                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ PpsEx                                        : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 1 1 ...
##  $ PpsOro                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PpsOthPr                                     : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 1 1 ...
##  $ PpsVet                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PpsAut                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PpsInt                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ PpsOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ Terps                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TpsSub                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TpsLoc                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TpsAut                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TpsOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Eps                                          : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ EpsRes                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ EpsFis                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ EpsOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Mps                                          : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MpsMe                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MpsJt                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MpsPro                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MpsOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrGen                                        : Factor w/ 2 levels "0","1": 1 2 2 2 2 2 2 2 2 1 ...
##  $ EqGen                                        : Factor w/ 4 levels "0","1","2","3": 2 1 2 2 1 2 2 2 1 1 ...
##  $ HrDem                                        : Factor w/ 4 levels "0","1","2","3": 1 1 3 3 2 1 1 2 2 2 ...
##  $ Prot                                         : Factor w/ 4 levels "0","1","2","3": 1 1 2 2 1 3 1 1 1 1 ...
##  $ ProtCiv                                      : Factor w/ 2 levels "0","1": 1 1 2 2 1 2 1 1 1 1 ...
##  $ ProtGrp                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 1 1 1 ...
##  $ ProtLgl                                      : Factor w/ 2 levels "0","1": 1 1 2 1 1 2 1 1 1 1 ...
##  $ ProtOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrFra                                        : Factor w/ 4 levels "0","1","2","3": 1 1 4 1 1 2 1 2 1 1 ...
##  $ HrfSp                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrfBor                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 2 1 1 ...
##  $ HrfTinc                                      : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 1 1 1 ...
##  $ HrfOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrCp                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprLife                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprTort                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprEq                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprSlav                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprLib                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprDet                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprFmov                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprFspe                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprFass                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprTria                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprPriv                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprVote                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprReli                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CprOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrSec                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerProp                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerWork                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerHeal                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerEdu                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerStdl                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerShel                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerSs                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerCult                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SerOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrNi                                         : Factor w/ 4 levels "0","1","2","3": 1 1 2 1 1 2 1 2 1 1 ...
##  $ HrNiMe                                       : Factor w/ 2 levels "0","1": 1 1 2 1 1 2 1 2 1 1 ...
##  $ HrNiNe                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrNiOth                                      : Factor w/ 1 level "0": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrIi                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrIiMon                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrIiBod                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrIiOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrMob                                        : Factor w/ 2 levels "0","1": 1 1 1 1 2 1 1 1 1 1 ...
##  $ HrDet                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Med                                          : Factor w/ 4 levels "0","1","2","3": 1 1 2 1 2 1 2 2 1 1 ...
##  $ MedGov                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MedSubs                                      : Factor w/ 2 levels "0","1": 1 1 2 1 2 1 2 2 1 1 ...
##  $ MedLog                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ MedOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ HrCit                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 3 1 3 2 3 1 1 ...
##  $ CitGen                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ CitRights                                    : Factor w/ 2 levels "0","1": 1 1 1 2 1 2 1 2 1 1 ...
##  $ CitDef                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CitOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ JusCr                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 2 1 1 ...
##  $ JusCrSp                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 1 1 1 ...
##  $ JusCrSys                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 2 1 1 ...
##  $ JusCrPow                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ JusEm                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ JusJu                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 1 2 1 ...
##  $ JusPri                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 2 1 1 ...
##  $ JusTra                                       : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ Dev                                          : Factor w/ 4 levels "0","1","2","3": 1 1 2 3 2 2 2 2 2 2 ...
##  $ DevSoc                                       : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 2 2 2 2 ...
##  $ DevHum                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 2 1 1 ...
##  $ DevInfra                                     : Factor w/ 2 levels "0","1": 1 1 1 1 2 2 1 1 2 2 ...
##  $ NEC                                          : Factor w/ 2 levels "0","1": 1 1 2 2 1 2 1 2 2 1 ...
##  $ NatRes                                       : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 1 2 2 1 ...
##  $ IntFu                                        : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 2 2 2 2 ...
##  $ Bus                                          : Factor w/ 4 levels "0","1","2","3": 1 1 2 2 2 2 1 1 2 1 ...
##  $ Tax                                          : Factor w/ 4 levels "0","1","2","3": 1 1 2 1 1 1 1 2 2 1 ...
##  $ TaxPo                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TaxRef                                       : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 2 2 1 ...
##  $ TaxOth                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Ban                                          : Factor w/ 2 levels "0","1": 1 1 2 1 1 2 1 1 1 1 ...
##  $ CenBan                                       : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 1 1 1 ...
##  $ BanPers                                      : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 1 1 1 ...
##  $ BanInt                                       : Factor w/ 2 levels "0","1": 1 1 2 1 1 2 1 1 1 1 ...
##  $ BanXb                                        : Factor w/ 2 levels "0","1": 1 1 2 1 1 1 1 1 1 1 ...
##  $ LaRef                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaRefMan                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaRefRet                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaRefOth                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaNom                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaCH                                         : Factor w/ 2 levels "0","1": 1 1 2 1 2 1 1 1 1 1 ...
##  $ LaCHTa                                       : Factor w/ 2 levels "0","1": 1 1 1 1 2 1 1 1 1 1 ...
##  $ LaCHIt                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaCHPro                                      : Factor w/ 2 levels "0","1": 1 1 2 1 2 1 1 1 1 1 ...
##  $ LaCHOth                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ LaEn                                         : Factor w/ 2 levels "0","1": 1 1 2 2 2 1 1 2 1 1 ...
##  $ Wat                                          : Factor w/ 2 levels "0","1": 1 1 1 1 2 1 1 1 2 1 ...
##  $ SsrGua                                       : Factor w/ 2 levels "0","1": 1 1 2 2 2 2 2 2 2 2 ...
##  $ Ce                                           : Factor w/ 4 levels "0","1","2","3": 2 1 1 1 1 1 1 1 1 1 ...
##  $ CeProv                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ CeGen                                        : Factor w/ 2 levels "0","1": 2 1 1 1 1 1 1 1 1 1 ...
##  $ SsrPol                                       : Factor w/ 4 levels "0","1","2","3": 1 1 2 2 1 2 1 2 2 2 ...
##  $ SsrArm                                       : Factor w/ 4 levels "0","1","2","3": 1 1 2 2 1 4 2 3 2 1 ...
##  $ SsrDdr                                       : Factor w/ 4 levels "0","1","2","3": 3 1 2 2 2 2 1 2 2 1 ...
##  $ DdrDemil                                     : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ DdrProg                                      : Factor w/ 2 levels "0","1": 2 1 2 2 2 2 1 2 2 1 ...
##  $ SsrInt                                       : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ SsrPsf                                       : Factor w/ 2 levels "0","1": 2 1 1 1 1 2 2 2 1 1 ...
##  $ SsrFf                                        : Factor w/ 2 levels "0","1": 2 1 2 2 1 1 1 1 1 1 ...
##  $ Cor                                          : Factor w/ 4 levels "0","1","2","3": 1 2 3 2 3 3 2 3 1 1 ...
##  $ SsrCrOcr                                     : Factor w/ 4 levels "0","1","2","3": 1 1 3 1 1 3 1 3 2 3 ...
##  $ SsrDrugs                                     : Factor w/ 4 levels "0","1","2","3": 1 1 3 2 3 3 1 3 2 2 ...
##  $ Terr                                         : Factor w/ 2 levels "0","1": 2 1 2 2 2 2 2 2 2 2 ...
##  $ TjGen                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjAm                                         : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 3 1 1 1 ...
##  $ TjAmPro                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjSan                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 2 1 1 1 ...
##  $ TjPower                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjAmBan                                      : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjCou                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjJaNc                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjJaIc                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjMech                                       : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjPrire                                      : Factor w/ 4 levels "0","1","2","3": 4 1 1 1 1 3 3 1 1 1 ...
##  $ TjVet                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjVic                                        : Factor w/ 4 levels "0","1","2","3": 1 1 2 1 1 2 1 1 1 1 ...
##  $ TjMis                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjRep                                        : Factor w/ 4 levels "0","1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjRSym                                       : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjRMa                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ TjNR                                         : Factor w/ 4 levels "0","1","2","3": 1 1 2 2 2 2 2 2 1 1 ...
##  $ ImUN                                         : Factor w/ 2 levels "0","1": 1 2 1 2 1 1 1 1 1 1 ...
##  $ ImOth                                        : Factor w/ 2 levels "0","1": 1 2 1 1 1 1 1 1 1 1 ...
##  $ ImRef                                        : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
##  $ ImPK                                         : Factor w/ 2 levels "0","1": 1 1 1 1 1 2 1 2 2 1 ...
##  $ ImE                                          : Factor w/ 2 levels "0","1": 2 1 2 1 1 2 1 1 1 1 ...
##  $ ImSrc                                        : Factor w/ 2 levels "0","1": 2 2 2 2 2 2 2 2 2 2 ...

Vuelvo a mostrar la tabla con los objetos de R corregidos

# Muestro el tipo de cada variable formateado con kable
vartypes <- data.table(variable = colnames(peace), clase = sapply(peace, class))
kable(vartypes, caption = "Asignación de clase de objeto R a cada variable") %>%
  kable_styling("striped", full_width = T)
Asignación de clase de objeto R a cada variable
variable clase
Country factor
Conflict_type factor
Peace_Process_Number integer
Peace Process_name factor
Region factor
Agreement_Id integer
Agreement_Name factor
Date_Signed factor
Agreement_Definition_and_Status factor
Agrmnt_length_pages integer
Agrmnt_length_characters integer
Agrmnt_Conflict_Type factor
Agreement_Stage factor
Sub_stage factor
Parties factor
Third_Party factor
Other_Agreement factor
Loc1ISO factor
Loc2ISO factor
Loc1GWNO integer
Loc2GWNO integer
Uppsala_Conflict_Data_Program_Conflict_ID factor
Uppsala_Conflict_Data_Program_Peace_Agreement numeric
Peace_Accord_Matrix_Agrmnt integer
Correlates_War integer
GCh factor
GChRhet factor
GChAntid factor
GChSubs factor
GChOth factor
GDis factor
GDisRhet factor
GDisAntid factor
GDisSubs factor
GDisOth factor
GAge factor
GAgeRhet factor
GAgeAntid factor
GAgeSubs factor
GAgeOth factor
GMig factor
GMigRhet factor
GMigAntid factor
GMigSubs factor
GMigOth factor
GRa factor
GRaRhet factor
GRaAntid factor
GRaSubs factor
GRaOth factor
GRe factor
GReRhet factor
GReAntid factor
GReSubs factor
GReOth factor
GInd factor
GIndRhet factor
GIndAntid factor
GIndSubs factor
GIndOth factor
GOth factor
GOthRhet factor
GOthAntid factor
GOthSubs factor
GOthOth factor
GRef factor
GRefRhet factor
GRefSubs factor
GRefOth factor
GSoc factor
GSocRhet factor
GSocAntid factor
GSocSubs factor
GSocOth factor
GeWom factor
GeMe factor
GeMeNu factor
GeMeOth factor
GeSo factor
GeLgbti factor
GeLgbtiPos factor
GeLgbtiNeg factor
GeFa factor
StDef factor
StGen factor
StCon factor
StSd factor
StRef factor
StSym factor
StInd factor
StUni factor
StBor factor
StXbor factor
Pol factor
PolGen factor
PolNewInd factor
PolNewTemp factor
ConRen factor
Cons factor
Ele factor
ElecComm factor
PolPar factor
PolParTrans factor
PolParOth factor
Civso factor
Tral factor
Pubad factor
Polps factor
PpsSt factor
PpsSub factor
PpsEx factor
PpsOro factor
PpsOthPr factor
PpsVet factor
PpsAut factor
PpsInt factor
PpsOth factor
Terps factor
TpsSub factor
TpsLoc factor
TpsAut factor
TpsOth factor
Eps factor
EpsRes factor
EpsFis factor
EpsOth factor
Mps factor
MpsMe factor
MpsJt factor
MpsPro factor
MpsOth factor
HrGen factor
EqGen factor
HrDem factor
Prot factor
ProtCiv factor
ProtGrp factor
ProtLgl factor
ProtOth factor
HrFra factor
HrfSp factor
HrfBor factor
HrfTinc factor
HrfOth factor
HrCp factor
CprLife factor
CprTort factor
CprEq factor
CprSlav factor
CprLib factor
CprDet factor
CprFmov factor
CprFspe factor
CprFass factor
CprTria factor
CprPriv factor
CprVote factor
CprReli factor
CprOth factor
HrSec factor
SerProp factor
SerWork factor
SerHeal factor
SerEdu factor
SerStdl factor
SerShel factor
SerSs factor
SerCult factor
SerOth factor
HrNi factor
HrNiMe factor
HrNiNe factor
HrNiOth factor
HrIi factor
HrIiMon factor
HrIiBod factor
HrIiOth factor
HrMob factor
HrDet factor
Med factor
MedGov factor
MedSubs factor
MedLog factor
MedOth factor
HrCit factor
CitGen factor
CitRights factor
CitDef factor
CitOth factor
JusCr factor
JusCrSp factor
JusCrSys factor
JusCrPow factor
JusEm factor
JusJu factor
JusPri factor
JusTra factor
Dev factor
DevSoc factor
DevHum factor
DevInfra factor
NEC factor
NatRes factor
IntFu factor
Bus factor
Tax factor
TaxPo factor
TaxRef factor
TaxOth factor
Ban factor
CenBan factor
BanPers factor
BanInt factor
BanXb factor
LaRef factor
LaRefMan factor
LaRefRet factor
LaRefOth factor
LaNom factor
LaCH factor
LaCHTa factor
LaCHIt factor
LaCHPro factor
LaCHOth factor
LaEn factor
Wat factor
SsrGua factor
Ce factor
CeProv factor
CeGen factor
SsrPol factor
SsrArm factor
SsrDdr factor
DdrDemil factor
DdrProg factor
SsrInt factor
SsrPsf factor
SsrFf factor
Cor factor
SsrCrOcr factor
SsrDrugs factor
Terr factor
TjGen factor
TjAm factor
TjAmPro factor
TjSan factor
TjPower factor
TjAmBan factor
TjCou factor
TjJaNc factor
TjJaIc factor
TjMech factor
TjPrire factor
TjVet factor
TjVic factor
TjMis factor
TjRep factor
TjRSym factor
TjRMa factor
TjNR factor
ImUN factor
ImOth factor
ImRef factor
ImPK factor
ImE factor
ImSrc factor

Compruebo que no hay valores nulos.

# Busco primero qué variables tienen valores perdidos
sapply(peace, function(x) sum(is.na(x)))
##                                       Country 
##                                             0 
##                                 Conflict_type 
##                                             0 
##                          Peace_Process_Number 
##                                             7 
##                            Peace Process_name 
##                                             0 
##                                        Region 
##                                             0 
##                                  Agreement_Id 
##                                             0 
##                                Agreement_Name 
##                                             0 
##                                   Date_Signed 
##                                             0 
##               Agreement_Definition_and_Status 
##                                             0 
##                           Agrmnt_length_pages 
##                                             0 
##                      Agrmnt_length_characters 
##                                             0 
##                          Agrmnt_Conflict_Type 
##                                             0 
##                               Agreement_Stage 
##                                             0 
##                                     Sub_stage 
##                                             0 
##                                       Parties 
##                                             0 
##                                   Third_Party 
##                                             0 
##                               Other_Agreement 
##                                             0 
##                                       Loc1ISO 
##                                             0 
##                                       Loc2ISO 
##                                             0 
##                                      Loc1GWNO 
##                                            20 
##                                      Loc2GWNO 
##                                          1557 
##     Uppsala_Conflict_Data_Program_Conflict_ID 
##                                           107 
## Uppsala_Conflict_Data_Program_Peace_Agreement 
##                                          1492 
##                    Peace_Accord_Matrix_Agrmnt 
##                                          1756 
##                                Correlates_War 
##                                           678 
##                                           GCh 
##                                             0 
##                                       GChRhet 
##                                             0 
##                                      GChAntid 
##                                             0 
##                                       GChSubs 
##                                             0 
##                                        GChOth 
##                                             0 
##                                          GDis 
##                                             0 
##                                      GDisRhet 
##                                             0 
##                                     GDisAntid 
##                                             0 
##                                      GDisSubs 
##                                             0 
##                                       GDisOth 
##                                             0 
##                                          GAge 
##                                             0 
##                                      GAgeRhet 
##                                             0 
##                                     GAgeAntid 
##                                             0 
##                                      GAgeSubs 
##                                             0 
##                                       GAgeOth 
##                                             0 
##                                          GMig 
##                                             0 
##                                      GMigRhet 
##                                             0 
##                                     GMigAntid 
##                                             0 
##                                      GMigSubs 
##                                             0 
##                                       GMigOth 
##                                             0 
##                                           GRa 
##                                             0 
##                                       GRaRhet 
##                                             0 
##                                      GRaAntid 
##                                             0 
##                                       GRaSubs 
##                                             0 
##                                        GRaOth 
##                                             0 
##                                           GRe 
##                                             0 
##                                       GReRhet 
##                                             0 
##                                      GReAntid 
##                                             0 
##                                       GReSubs 
##                                             0 
##                                        GReOth 
##                                             0 
##                                          GInd 
##                                             0 
##                                      GIndRhet 
##                                             0 
##                                     GIndAntid 
##                                             0 
##                                      GIndSubs 
##                                             0 
##                                       GIndOth 
##                                             0 
##                                          GOth 
##                                             0 
##                                      GOthRhet 
##                                             0 
##                                     GOthAntid 
##                                             0 
##                                      GOthSubs 
##                                             0 
##                                       GOthOth 
##                                             0 
##                                          GRef 
##                                             0 
##                                      GRefRhet 
##                                             0 
##                                      GRefSubs 
##                                             0 
##                                       GRefOth 
##                                             0 
##                                          GSoc 
##                                             0 
##                                      GSocRhet 
##                                             0 
##                                     GSocAntid 
##                                             0 
##                                      GSocSubs 
##                                             0 
##                                       GSocOth 
##                                             0 
##                                         GeWom 
##                                             0 
##                                          GeMe 
##                                             0 
##                                        GeMeNu 
##                                             0 
##                                       GeMeOth 
##                                             0 
##                                          GeSo 
##                                             0 
##                                       GeLgbti 
##                                             0 
##                                    GeLgbtiPos 
##                                             0 
##                                    GeLgbtiNeg 
##                                             0 
##                                          GeFa 
##                                             0 
##                                         StDef 
##                                             0 
##                                         StGen 
##                                             0 
##                                         StCon 
##                                             0 
##                                          StSd 
##                                             0 
##                                         StRef 
##                                             0 
##                                         StSym 
##                                             0 
##                                         StInd 
##                                             0 
##                                         StUni 
##                                             0 
##                                         StBor 
##                                             0 
##                                        StXbor 
##                                             0 
##                                           Pol 
##                                             0 
##                                        PolGen 
##                                             0 
##                                     PolNewInd 
##                                             0 
##                                    PolNewTemp 
##                                             0 
##                                        ConRen 
##                                             0 
##                                          Cons 
##                                             0 
##                                           Ele 
##                                             0 
##                                      ElecComm 
##                                             0 
##                                        PolPar 
##                                             0 
##                                   PolParTrans 
##                                             0 
##                                     PolParOth 
##                                             0 
##                                         Civso 
##                                             0 
##                                          Tral 
##                                             0 
##                                         Pubad 
##                                             0 
##                                         Polps 
##                                             0 
##                                         PpsSt 
##                                             0 
##                                        PpsSub 
##                                             0 
##                                         PpsEx 
##                                             0 
##                                        PpsOro 
##                                             0 
##                                      PpsOthPr 
##                                             0 
##                                        PpsVet 
##                                             0 
##                                        PpsAut 
##                                             0 
##                                        PpsInt 
##                                             0 
##                                        PpsOth 
##                                             0 
##                                         Terps 
##                                             0 
##                                        TpsSub 
##                                             0 
##                                        TpsLoc 
##                                             0 
##                                        TpsAut 
##                                             0 
##                                        TpsOth 
##                                             0 
##                                           Eps 
##                                             0 
##                                        EpsRes 
##                                             0 
##                                        EpsFis 
##                                             0 
##                                        EpsOth 
##                                             0 
##                                           Mps 
##                                             0 
##                                         MpsMe 
##                                             0 
##                                         MpsJt 
##                                             0 
##                                        MpsPro 
##                                             0 
##                                        MpsOth 
##                                             0 
##                                         HrGen 
##                                             0 
##                                         EqGen 
##                                             0 
##                                         HrDem 
##                                             0 
##                                          Prot 
##                                             0 
##                                       ProtCiv 
##                                             0 
##                                       ProtGrp 
##                                             0 
##                                       ProtLgl 
##                                             0 
##                                       ProtOth 
##                                             0 
##                                         HrFra 
##                                             0 
##                                         HrfSp 
##                                             0 
##                                        HrfBor 
##                                             0 
##                                       HrfTinc 
##                                             0 
##                                        HrfOth 
##                                             0 
##                                          HrCp 
##                                             0 
##                                       CprLife 
##                                             0 
##                                       CprTort 
##                                             0 
##                                         CprEq 
##                                             0 
##                                       CprSlav 
##                                             0 
##                                        CprLib 
##                                             0 
##                                        CprDet 
##                                             0 
##                                       CprFmov 
##                                             0 
##                                       CprFspe 
##                                             0 
##                                       CprFass 
##                                             0 
##                                       CprTria 
##                                             0 
##                                       CprPriv 
##                                             0 
##                                       CprVote 
##                                             0 
##                                       CprReli 
##                                             0 
##                                        CprOth 
##                                             0 
##                                         HrSec 
##                                             0 
##                                       SerProp 
##                                             0 
##                                       SerWork 
##                                             0 
##                                       SerHeal 
##                                             0 
##                                        SerEdu 
##                                             0 
##                                       SerStdl 
##                                             0 
##                                       SerShel 
##                                             0 
##                                         SerSs 
##                                             0 
##                                       SerCult 
##                                             0 
##                                        SerOth 
##                                             0 
##                                          HrNi 
##                                             0 
##                                        HrNiMe 
##                                             0 
##                                        HrNiNe 
##                                             0 
##                                       HrNiOth 
##                                             0 
##                                          HrIi 
##                                             0 
##                                       HrIiMon 
##                                             0 
##                                       HrIiBod 
##                                             0 
##                                       HrIiOth 
##                                             0 
##                                         HrMob 
##                                             0 
##                                         HrDet 
##                                             0 
##                                           Med 
##                                             0 
##                                        MedGov 
##                                             0 
##                                       MedSubs 
##                                             0 
##                                        MedLog 
##                                             0 
##                                        MedOth 
##                                             0 
##                                         HrCit 
##                                             0 
##                                        CitGen 
##                                             0 
##                                     CitRights 
##                                             0 
##                                        CitDef 
##                                             0 
##                                        CitOth 
##                                             0 
##                                         JusCr 
##                                             0 
##                                       JusCrSp 
##                                             0 
##                                      JusCrSys 
##                                             0 
##                                      JusCrPow 
##                                             0 
##                                         JusEm 
##                                             0 
##                                         JusJu 
##                                             0 
##                                        JusPri 
##                                             0 
##                                        JusTra 
##                                             0 
##                                           Dev 
##                                             0 
##                                        DevSoc 
##                                             0 
##                                        DevHum 
##                                             0 
##                                      DevInfra 
##                                             0 
##                                           NEC 
##                                             0 
##                                        NatRes 
##                                             0 
##                                         IntFu 
##                                             0 
##                                           Bus 
##                                             0 
##                                           Tax 
##                                             0 
##                                         TaxPo 
##                                             0 
##                                        TaxRef 
##                                             0 
##                                        TaxOth 
##                                             0 
##                                           Ban 
##                                             0 
##                                        CenBan 
##                                             0 
##                                       BanPers 
##                                             0 
##                                        BanInt 
##                                             0 
##                                         BanXb 
##                                             0 
##                                         LaRef 
##                                             0 
##                                      LaRefMan 
##                                             0 
##                                      LaRefRet 
##                                             0 
##                                      LaRefOth 
##                                             0 
##                                         LaNom 
##                                             0 
##                                          LaCH 
##                                             0 
##                                        LaCHTa 
##                                             0 
##                                        LaCHIt 
##                                             0 
##                                       LaCHPro 
##                                             0 
##                                       LaCHOth 
##                                             0 
##                                          LaEn 
##                                             0 
##                                           Wat 
##                                             0 
##                                        SsrGua 
##                                             0 
##                                            Ce 
##                                             0 
##                                        CeProv 
##                                             0 
##                                         CeGen 
##                                             0 
##                                        SsrPol 
##                                             0 
##                                        SsrArm 
##                                             0 
##                                        SsrDdr 
##                                             0 
##                                      DdrDemil 
##                                             0 
##                                       DdrProg 
##                                             0 
##                                        SsrInt 
##                                             0 
##                                        SsrPsf 
##                                             0 
##                                         SsrFf 
##                                             0 
##                                           Cor 
##                                             0 
##                                      SsrCrOcr 
##                                             0 
##                                      SsrDrugs 
##                                             0 
##                                          Terr 
##                                             0 
##                                         TjGen 
##                                             0 
##                                          TjAm 
##                                             0 
##                                       TjAmPro 
##                                             0 
##                                         TjSan 
##                                             0 
##                                       TjPower 
##                                             0 
##                                       TjAmBan 
##                                             0 
##                                         TjCou 
##                                             0 
##                                        TjJaNc 
##                                             0 
##                                        TjJaIc 
##                                             0 
##                                        TjMech 
##                                             0 
##                                       TjPrire 
##                                             0 
##                                         TjVet 
##                                             0 
##                                         TjVic 
##                                             0 
##                                         TjMis 
##                                             0 
##                                         TjRep 
##                                             0 
##                                        TjRSym 
##                                             0 
##                                         TjRMa 
##                                             0 
##                                          TjNR 
##                                             0 
##                                          ImUN 
##                                             0 
##                                         ImOth 
##                                             0 
##                                         ImRef 
##                                             0 
##                                          ImPK 
##                                             0 
##                                           ImE 
##                                             0 
##                                         ImSrc 
##                                             0

2.2 Análisis descriptivo visual

Represento gráficamente las variables del conjunto de datos para poder visualizar la distribución de valores de las variables.

Para las variables categóricas o cualitativas elijo un boxplot, para las cuantitativas un histograma.

# Muestro un histograma para cada variable cuantitativa o un gráfico de barras en caso de que
# sea una variable cualitativa.
for (i in 1:ncol(peace)) {
  if (class(peace[,i]) != "factor") {
    hist(peace[,i], freq = TRUE, col = c("green"), 
         main=paste("Distribución de ", 
                    str_to_title(str_replace(colnames(peace[i]), "_", " ")), sep = " "),
         xlab= str_to_title(str_replace(colnames(peace[i]), "_", " ")))
  }
  else {
    barplot(table(peace[,i]),
            col = c("orange","yellow","blue","red"),
            main=paste("Distribución de ", 
                    str_to_title(str_replace(colnames(peace[i]), "_", " ")), sep = " "),
            xlab= str_to_title(str_replace(colnames(peace[i]), "_", " ")))
  }
}

Baayen, R Harald. 2008. Analyzing Linguistic Data: A Practical Introduction to Statistics Using R. Cambridge University Press.

Gibergans Bàquena, J. 2009. Regresión Lineal Simple. Universitat Oberta de Catalunya, UOC.

Gibergans Bàquena, Josep. 2009. Regresión Lineal Múltiple. Universitat Oberta de Catalunya, UOC.

Gillén Estany, Montserrat. 2017. Modelización Predictiva: Introducción a Los Modelos Lineales Generalizados. Universitat Oberta de Catalunya, UOC.

Hothorn, Torsten, and Brian S Everitt. 2014. A Handbook of Statistical Analyses Using R. CRC press.

Http://Myrcodes.blogspot.com/2013/12/Area-Under-Curve-Auc-Proc-Package.html. Accedido 16/05/2019.

Http://Www.sthda.com/English/Articles/40-Regression-Analysis/166-Predict-in-R-Model-Predictions-and-Confidence-Intervals/. Accedido 15/05/2019.

Https://Rpubs.com/Emilopezcano/Logit. Accedido 16/05/2019.

Https://Rpubs.com/Joaquin_AR/218456. Accedido 15/05/2019.

Teetor, Paul. 2011. R Cookbook: Proven Recipes for Data Analysis, Statistics, and Graphics. “ O’Reilly Media, Inc.”

Vegas Lozano, Esteban. Preprocesamiento de Los Datos. Universitat Oberta de Catalunya, UOC.